package com.itheima;

public class demo02 {
    public static void main(String[] args)  {
        runnable runnable = new runnable();
        new Thread(runnable).start();
        new Thread(runnable).start();
    }

    public static class runnable implements Runnable {

        public void run() {

            for (int i = 0; i < 5; i++) {
                try {
                    Thread.sleep(100);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                System.out.println(Thread.currentThread().getName());
            }
        }
    }
}
